package com.mask.im.business.enums;

import com.mask.im.business.common.exception.BusinessException;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author jian
 */

@Getter
@AllArgsConstructor
public enum VerificationLoginEnum {
	EMAIL_LOGIN(2,"emailLoginImpl"),
	MOBILE_LOGIN(3,"mobileLoginImpl");

	private final Integer type;

	private final String executeStrategy;

	public static String getStrategy(Integer type){
		for (VerificationLoginEnum value : VerificationLoginEnum.values()) {
			if (value.type.equals(type)){
				return value.executeStrategy;
			}
		}
		throw new BusinessException("错误请求");
	}
}
